package com.list;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class list2ArrayListCls {
	public static void main(String[] args) {
		List list = new ArrayList();
		list.add("e");
		list.add("m");
		list.add("n");
		list.add("k");
		list.add("i");
		list.add("p");
		list.add("m");
		list.add("e");
		Iterator i=list.listIterator();
		while(i.hasNext()){
			System.out.print(i.next()+",");
		}
		System.out.println();
		List subList=list.subList(1, 4);
		i=subList.listIterator();
		while(i.hasNext()){
			System.out.print(i.next()+",");
		}
		System.out.println();
		list.remove("m");
		i=list.iterator();
		while(i.hasNext()){
			System.out.print(i.next()+",");
		}
	}
}
